<template>
  <div class="nav">
    <mu-tabs :value="currentTab" @change="handleTabChange" class="tab">
        <mu-tab v-for="menu in menus" :key="menu.id" :value="menu.id" :title="menu.title"/>
    </mu-tabs>
  </div>
</template>


<script>
import {mapActions} from "vuex";
  export default {
    name:"navMenu",
    props:['currentTab','menus'],
    methods: {
      handleTabChange (val) {
        this.$router.push(this.menus[val-1].path)
      }
    }
  }
</script>